import Vue from 'vue'
import VueRouter from 'vue-router';
import { learnlist } from './learningcenter.js';
import { lecturerlist } from './lecturer.js';
import { courseslist } from './courses.js';


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    redirect: '/index',
    component: () => import('@/views/HomeView.vue'),
    meta: {},
    children: [
      {
        path: 'index',
        name: 'homeindex',
        component: () => import('@/views/home/index.vue'),
        meta: { title: '首页' },
      }
    ].concat(learnlist).concat(courseslist).concat(lecturerlist)
  },
]

const router = new VueRouter({
  routes
})

export default router
